<template>
	<view class="">
		<view class="product_list">
			<view class="product" v-for="(item,index) in product" @tap="toproductdetail(index)">
				<image :src="item.pic" mode=""></image>
				<view class="product_info">
					<view class="product_info_t">
						<view class="title">
							{{item.title}}
						</view>
						<view class="exchange_num">
							<!-- 已兑换{{item.exchangeNum}}万件 -->
							<view class="progess">
								
							</view>
							仅剩10.8%
						</view>
					</view>
					<view class="product_info_b">
						<text class="integral_num">{{item.price}}</text>
						<text class="price">￥{{item.line_price}}</text>
					</view>
					<!-- <image class="toexchange" src="../../static/image/mine/integral/toexchange.png" mode=""></image> -->
					<view class="buy">
						立即抢
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data () {
			return {
				product: [
					{
						pic:'../../static/image/mine/integral/product11.png',
						title:'荥阳豫河阴突尼斯软籽石榴水果新鲜包邮软子红甜无籽石榴一级大果',
						exchangeNum: '5',
						integral: 1200,
						price: '179.00',
						line_price: '169.00'
					},
					{
						pic:'../../static/image/mine/integral/product12.png',
						title:'荥阳豫河阴突尼斯软籽石榴水果新鲜包邮软子红甜无籽石榴一级大果',
						exchangeNum: '5.1',
						integral: 1200,
						price: '129.00',
						line_price: '169.00'
					},
					{
						pic:'../../static/image/mine/integral/product13.png',
						title:'荥阳豫河阴突尼斯软籽石榴水果新鲜包邮软子红甜无籽石榴一级大果',
						exchangeNum: '1',
						integral: 1500,
						price: '169.00',
						line_price: '169.00'
					},
					{
						pic:'../../static/image/mine/integral/product14.png',
						title:'荥阳豫河阴突尼斯软籽石榴水果新鲜包邮软子红甜无籽石榴一级大果',
						exchangeNum: '1',
						integral: 1900,
						price: '169.00',
						line_price: '169.00'
					}
				]
			}
		},
		methods: {
			toproductdetail (index) {
				this.$emit('toproductdetail', index)
			}
		}
	}
</script>

<style lang="less" scoped>
	.product_list {
		width: calc(100% - 30upx);
		margin: auto;
		.tilte {
			font-size: 32upx;
			color: #333333;
			font-weight: bold;
			margin-bottom: 30upx;
		}
		.product {
			margin-bottom: 20upx;
			width: 100%;
			padding: 25upx 15upx;
			box-sizing: border-box;
			background-color: #FFFFFF;
			display: flex;
			align-items: center;
			image {
				width: 180upx;
				height: 180upx;
				margin-right: 25upx;
			}
			.product_info {
				flex: 1;
				height: 180upx;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				position: relative;
				.product_info_t {
					.title {
						font-size: 24upx;
						color: #333333;
						line-height: 36upx;
					}
					.exchange_num {
						display: flex;
						align-items: center;
						line-height: 24upx;
						margin-top: 10upx;
						.progess {
							width: 280upx;
							height: 20upx;
							border: 2upx solid #f73e2f;
							border-radius: 10upx;
							box-sizing: border-box;
							margin-right: 10upx;
						}
						font-size: 24upx;
						color: #f73e2f;
					}
				}
				.product_info_b {
					font-size: 20upx;
					color: #f73e2f;
					.integral_num {
						font-size: 24upx;
						font-weight: bold;
					}
					.price {
						margin-left: 20upx;
						color: #999999;
						text-decoration: line-through;
					}
				}
				.buy {
					position: absolute;
					bottom: 0;
					right: 15upx;
					width: 130upx;
					height: 48upx;
					font-size: 28upx;
					color: #FFFFFF;
					text-align: center;
					line-height: 48upx;
					border-radius: 24upx;
					background: linear-gradient(to right,#f73e2f 0%,#fc5b2f 100%);
					box-shadow: 0 0 6upx 0 #fc5b2f;
				}
			}
		}
	}
</style>
